<div class="ecatalogue_filter">
        <label for="statut"><:ecatalogue:status:></label>
        <select id="statut" name="statut">
            <option value="0">Не выбрано</option>
            <option value="publie" [(#ENV{statut}|=={publie}|?{'selected'})]><:ecatalogue:publie:></option>
            <option value="prepa" [(#ENV{statut}|=={prepa}|?{'selected'})]><:ecatalogue:prepa:></option>
        </select>
        
        <label for="sku"><:ecatalogue:sku:></label>
        <input type="text" name="sku" id="sku" value="#ENV{sku}" />
        
        <center>
            <input type="button" name="filter_button" id="filter_button" value="<:ecatalogue:filter:>" />
            <input type="button" name="clean_button" id="clean_button" value="<:ecatalogue:clean:>" />
        </center>
</div>

<script type="text/javascript">
$(document).ready(function() {
    var id_rubrique = '#ENV{id_rubrique}';
    id_rubrique = id_rubrique != '' ? 'id_rubrique=' + id_rubrique + '&': '';
    
	$("#filter_button").click(function(){
       var statut = $('.ecatalogue_filter').find('select#statut').val();
       var sku = $('.ecatalogue_filter').find('input#sku').val();
       
       statut = statut != 0 ? 'statut=' + statut + '&': '';
       sku = sku != '' ? 'sku=' + sku + '&': '';
       
       window.location = '#URL_ECRIRE{ecatalogue_products}&' + id_rubrique + statut + sku;
	});
    
    $('#clean_button').click(function(){
        window.location = '#URL_ECRIRE{ecatalogue_products}&' + id_rubrique;
    });
});
</script>